home *** CD-ROM | disk | FTP | other *** search
- #include "faux3DUtils.h"
-
-
- static RGBColor ltGray = {0xDDDD, 0xDDDD, 0xDDDD};
- static RGBColor dkGray = {0xAAAA, 0xAAAA, 0xAAAA};
-
-
- void faux3DFrameRect ( Rect *r )
- {
- RGBForeColor( &dkGray ) ;
- MoveTo (r->right-1, r->top ) ;
- LineTo (r->right-1, r->bottom-1 ) ;
- LineTo (r->left, r->bottom-1 ) ;
-
- ForeColor(whiteColor) ;
- MoveTo (r->right-1, r->top ) ;
- LineTo (r->left, r->top ) ;
- LineTo (r->left, r->bottom-1 ) ;
- }
-
-
- void faux3DFrameRectIn ( Rect *r )
- {
- ForeColor(whiteColor) ;
- MoveTo (r->right-1, r->top ) ;
- LineTo (r->right-1, r->bottom-1 ) ;
- LineTo (r->left, r->bottom-1 ) ;
-
- RGBForeColor( &dkGray ) ;
- MoveTo (r->right-1, r->top ) ;
- LineTo (r->left, r->top ) ;
- LineTo (r->left, r->bottom-1 ) ;
- }
-
-
- void faux3DFillRect ( Rect *r )
- {
- InsetRect (r,1,1) ;
- RGBForeColor( <Gray ) ;
- PaintRect( r ) ;
- InsetRect (r,-1,-1) ;
- faux3DFrameRect ( r ) ;
- }
-
- void faux3DFillRectIn ( Rect *r )
- {
- ForeColor(whiteColor) ;
- PaintRect( r ) ;
- ForeColor(blackColor) ;
- FrameRect( r ) ;
- InsetRect (r,-1,-1) ;
- faux3DFrameRectIn ( r ) ;
- }
-
-